ALTER FUNCTION DateFromParts
(
	@year INTEGER,
	@month INTEGER,
	@day INTEGER
)
RETURNS DATE
AS

BEGIN 
	DECLARE @new_date DATE
	Select @new_date = Convert(Date, Convert(VARCHAR(4), @year) + '-' + Convert(VARCHAR(2), @month) + '-' + Convert(VARCHAR(2), @day))
	RETURN @new_date
END

